package com.evil.common.core.entity;

import lombok.Data;

import java.util.List;

@Data
public class BasePage<T> {
    /**
     * 当前页
     */
    private int pageNum;
    /**
     * 每页的数量
     */
    private int pageSize;
    /**
     * 总页数
     */
    private int pages;
    /**
     * 是否有下一页
     */
    private boolean hasNext;
    /**
     * 总记录数
     */
    private long total;
    /**
     * 结果集
     */
    private List<T> list;

    public BasePage() {
    }

    public BasePage(int pageNum, int pageSize, int pages, long total, List<T> list) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.pages = pages;
        this.total = total;
        this.list = list;
    }
}
